public class text09 {
    public static void main(String[] args){

        String str1 = "hello java";
        String str2 = "hello java";


        boolean areEqual = str1.equals(str2);

        System.out.println("是否相等" + areEqual);

        if (areEqual) {
            
            string withoutSpaces = str1.replace("","")
            System.out.println("去掉空格后" + withoutSpaces);

            String replacedStr = withoutSpaces.("java","word");
            System.out.println("替换后" + replacedStr);
        }
    }
}